package com.hzhanghuan.materialsearchview;

import android.content.Intent;

import java.util.HashMap;
import java.util.Map;


/**
 * Created by Administrator on 2016/7/12.
 */
public class Suggestion {

    private Intent mIntent;

    private String mTitle;

    private Map<String, Object> mExtend;





    public static Suggestion createSuggestion(String title, Intent intent, Map<String, Object> mExtend) {
        Suggestion suggestion = new Suggestion();
        suggestion.mTitle = title;
        suggestion.mIntent = intent;
        suggestion.mExtend = mExtend == null ? new HashMap<String, Object>() : mExtend;
        return suggestion;
    }





    public static Suggestion createSuggestion(String title, Intent intent) {
        return createSuggestion(title, intent, null);
    }





    public Intent getIntent() {
        return mIntent;
    }





    public String getTitle() {
        return mTitle;
    }





    public Object get(String key) {
        return mExtend.get(key);
    }
}
